<?php get_header();?>
<!--主内容区-->
<div class="main-body mt-20">
	<div class="container">
		<div class="row d-flex flex-wrap">
			<!--主内容区-->
			<article class="column xs-12 sm-12 md-8 mb-10-xs mb-0-md">

				<div class="base-list article-list search-list mb-20">
					<?php jiangqie_breadcrumbs(); ?>
					<?php if (is_category()): ?>
						<h5 class="mb-10">
							<?php 
							$categories = get_the_category();
							$cat_name = $categories[0]->cat_name;
							$cat_link = get_category_link($categories[0]->cat_ID);
							echo '<a href="' . $cat_link . '">' . $cat_name . '</a>';
							?>
						</h5>
					<?php endif; ?>

<!--                    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>-->
<!--                    <ins class="adsbygoogle"-->
<!--                         style="display:block"-->
<!--                         data-ad-format="fluid"-->
<!--                         data-ad-layout-key="-gw-3+1f-3d+2z"-->
<!--                         data-ad-client="ca-pub-6243451787655828"-->
<!--                         data-ad-slot="8442301843"></ins>-->
<!--                    <script>-->
<!--                        (adsbygoogle = window.adsbygoogle || []).push({});-->
<!--                    </script>-->

					<div class="base-box">
						<!-- 文章列表 -->
					</div>
					
					<div class="spinner">
						<div class="rect1"></div>
						<div class="rect2"></div>
						<div class="rect3"></div>
						<div class="rect4"></div>
						<div class="rect5"></div>
					</div>
				</div>

                <style type="text/css">
                    .pagination{
                        margin: auto;
                        text-align: center;
                    }
                    .pagination ul{
                        display: inline-block;
                    }
                    .pagination ul li{
                        display: block;
                        float: left;
                        min-width: 25px;
                        padding: 0 5px;
                        height: 25px;
                        margin-right: 5px;
                        border: 1px solid #ccc;
                        border-radius: 3px;
                    }
                    .pagination ul li a{
                        display: block;
                        width: 100%;
                        height: 100%;
                        line-height: 25px;
                        color: #ccc;
                        text-align: center;
                    }
                    .pagination ul li:hover, .pagination ul li.active{
                        background-color: #f60;
                        cursor: pointer;
                        border: 1px solid #f60;
                    }
                    .pagination ul li:hover a, .pagination ul li.active a {
                        color: white;
                    }
                </style>
                <?php
                    $tagID = 0;
                    $catID = 0;
                    $currentPage = isset($_GET['page']) ? $_GET['page'] : 1;

                    if (is_category()) {
                        $catID = $cat;
                    } else if (is_tag()) {
                        $tagName = single_tag_title('', false);
                        $tagObject = get_term_by('name', $tagName, 'post_tag');
                        $tagID = $tagObject->term_id;
                    }
                    custom_pagination($catID,$tagID,$currentPage);

                ?>
                <input type="hidden" name="start" value="<?php echo $currentPage; ?>">

			</article>

			<!--侧边栏-->
			<?php get_sidebar(); ?>
		</div>
	</div>
</div>

<?php get_footer(); ?>